package com.yq.ylmall.product.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.yq.ylmall.dto.product.ProductSpecQueryDto;
import com.yq.ylmall.model.product.ProductSpec;
import com.yq.ylmall.vo.product.ProductSpecPageVo;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * <p>
 * 商品规格 Mapper 接口
 * </p>
 *
 * @author yzk789
 * @since 2024-05-30
 */
public interface ProductSpecMapper extends BaseMapper<ProductSpec> {

    IPage<ProductSpecPageVo> queryProductSpecPage(IPage<ProductSpecPageVo> page, @Param("dto") ProductSpecQueryDto dto);


    ProductSpecPageVo getProductSpecInfoById(@Param("id") long productSpecId);

    void updateProductSpecById(@Param("dto") ProductSpec dto);

    IPage<ProductSpecPageVo>  getProductSpecInfoByName(IPage<ProductSpecPageVo> page, String specName);
}
